<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
    <title>登录</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.5.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container mt-5">
        <div class="row justify-content-center">
            <div class="col-md-6">
                <div class="card">
                    <div class="card-header">
                        <h3 class="text-center">登录</h3>
                    </div>
                    <div class="card-body">
                        <c:if test="${not empty error}">
                            <div class="alert alert-danger">${error}</div>
                        </c:if>
                        
                        <form action="login" method="post">
                            <div class="form-group">
                                <label>用户名</label>
                                <input type="text" name="username" class="form-control" required>
                            </div>
                            
                            <div class="form-group">
                                <label>密码</label>
                                <input type="password" name="password" class="form-control" required>
                            </div>
                            
                            <button type="submit" class="btn btn-primary btn-block">登录</button>
                        </form>
                        
                        <div class="text-center mt-3">
                            <a href="register">还没有账号？立即注册</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html> 